<template>
  <div class="content">
    <div class="title">
      <div>
        401,抱歉您没有权限访问
      </div>
      <el-button @click="goLogin">重新登录</el-button>
    </div>
  </div>
</template>

<script setup>
import { useRouter } from 'vue-router'
import { userStore } from '@/pinia/store.js'
const store = userStore()
const router = useRouter()
const back = () => {
  router.back()
}
const goLogin = () => {
  document.cookie = "token=" + ";expires=-1" +';max-age=0'
  store.$patch({
    id:'',
    info:{}
  })
  router.push('/login')
  location.reload()
}
</script>

<style scoped lang="less">
.content{
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-content: center;
  .title{
    height: 100px;
    font-size: 30px;
    font-weight: bold;
    color: black;
    display: flex;
    flex-direction: column;
    align-content: space-around;
    justify-content: space-around;
  }
}
</style>